Dirichlet-multinomial Distribution

It is a compound probability distribution, where a probability vector p is drawn from a Dirichlet distribution with parameter vector α, and an observation drawn from a multinomial distribution with probability vector p and number of trials N.

Specification

Pr(xα)=pPr(xp)Pr(pα)dp

which results in the following explicit formula:
Pr(xα)=(n!)Γ(α0)Γ(n+α0)k=1KΓ(xk+αk)(xk!)Γ(αk)=nB(α0,n)k:xk>0xkB(αk,xk)

where α0 is defined as the sum α0=αk The latter form emphasizes the fact that zero count categories can be ignored in the calculation.

Reference

Dirichlet-multinomial Distribution: https://en.wikipedia.org/wiki/Dirichlet-multinomial_distribution